-- GENERATED SPELL FOR [Wretched Devourer] --


function spell0_24960(pUnit, Event) --@Arcane Torrent,Self--
pUnit:FullCastSpellOnTarget(33390,pUnit)
pUnit:RegisterEvent('Sorts_24960', 2280, 1)
end

function spell1_24960(pUnit, Event) --@Mana Tap,n/a--
pUnit:FullCastSpellOnTarget(33483,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24960', 582, 1)
end

function spell2_24960(pUnit, Event) --@Nether Shock,n/a--
pUnit:FullCastSpellOnTarget(35334,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24960', 3306, 1)
end

function Sorts_24960(pUnit, Event)
local choix_sorts_24960 = math.random(0, 2)
if choix_sorts_24960 == 0 then
pUnit:RegisterEvent('spell0_24960', 1, 1)
end
if choix_sorts_24960 == 1 then
pUnit:RegisterEvent('spell1_24960', 1, 1)
end
if choix_sorts_24960 == 2 then
pUnit:RegisterEvent('spell2_24960', 1, 1)
end
end

function mob24960_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24960', math.random(1500, 3000), 1)
end

function mob24960_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24960_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24960_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24960, 1, 'mob24960_Action')
RegisterUnitEvent(24960, 2, 'mob24960_Leave')
RegisterUnitEvent(24960, 3, 'mob24960_Kill')
RegisterUnitEvent(24960, 4, 'mob24960_Die')
